export const formData = {
    formDate
}
function formDate(str:any) {
    const date = new Date(str);
    const year = date.getFullYear();
    const month = zero(date.getMonth() + 1);
    const day = zero(date.getDate());
    const hour = zero(date.getHours());
    const minute = zero(date.getMinutes());
    const second = zero(date.getSeconds());
    return year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + second;
}
function zero(n:number) {
    return n > 9 ? n : "0" + n
}